var entitypicker;
entitypicker = findUIComponent("ui_panel_entity_picker");
EntityPickerManager.entityPanelOn = !EntityPickerManager.entityPanelOn;
if (!EntityPickerManager.entityPanelOn)
{
    entitypicker.destX = entitypicker.prevDestX;
    
}
else
{
    entitypicker.destX = entitypicker.xstart;
}

EntityPickerManager.depth = -10000;
entitypicker.depth = EntityPickerManager.depth;
